From c00aa14e171953d2f31d3e159e27c4d60786bf86 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Mon, 10 Nov 2003 13:44:15 +0000 Subject: [PATCH] bitkeeper revision 1.582 (3faf962fX5syo8fIhzw2drHCKGZJ0w) os.h: Fix mini-os for pre 2.96 gcc. --- extras/mini-os/h/os.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extras/mini-os/h/os.h b/extras/mini-os/h/os.h index c63ae6cdd5..9be205e009 100644 --- a/extras/mini-os/h/os.h +++ b/extras/mini-os/h/os.h @@ -9,6 +9,15 @@ #define NULL 0 +/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented + a mechanism by which the user can annotate likely branch directions and + expect the blocks to be reordered appropriately. Define __builtin_expect + to nothing for earlier compilers. */ + +#if __GNUC__ == 2 && __GNUC_MINOR__ < 96 +#define __builtin_expect(x, expected_value) (x) +#endif + /* * These are the segment descriptors provided for us by the hypervisor. * For now, these are hardwired -- guest OSes cannot update the GDT -- 2.30.2